 //计算对象</script>
var calculator = {
	//用于保存输出的数字和符号数据
	number:[],
	//计算方法
	numberClick: numberClick,
	operatorClick: operatorClick,
	equalClick: equalClick,
	cleanClick: cleanClick
}
//输入数字方法
var numberClick = function (value) {
var val = document . getElementById("output").value;
//显示框为0时，输入0无效
if(value == "0" && val == "0") {
	return;
}
if (val == "0") {
	//如果显示框为0，则去掉0，只显示输入值
	document . getElementById("output").value = value;
	}else{
		//在显示框显示对应字符
		document. getElementById("output").value = val + value;
	}
}
//输出运算方法
var operatorClick = function (value) {
	var val = document . getElementById("output").value;
	//判断是否连续输出了两次运算符，运算符后面输出数字，不能连续输入多个运算符
	if(val [val.length - 1] == " "){
		return;
	}
	//在显示框显示对应的运算符
	document . getElementById("iputNum").value = val + " " + value + " ";
}
<div class="numbers">
	<!--在每个input标签内部注册对应的对象的计算方法-->
	<input type="button" value="7" onclick="calculator.numberClick(7)">
	<input type="button" value="8" onclick="calculator.numberClick(8)">
	<input type="button" value="9" onclick="calculator.numberClick(9)">
	<input type="button" value="4" onclick="calculator.numberClick(4)">
	<input type="button" value="5" onclick="calculator.numberClick(5)">
	<input type="button" value="6" onclick="calculator.numberClick(6)">
	<input type="button" value="1" onclick="calculator.numberClick(1)">
	<input type="button" value="2" onclick="calculator.numberClick(2)">
	<input type="button" value="3" onclick="calculator.numberClick(3)">
	<input type="button" value="0" onclick="calculator.numberClick(0)">
</div>
	<div class="operators">
	<input type="button" value="*" onclick="calculator.operatorClick(value)">
	<input type="button" value="-" onclick="calculator.operatorClick(value)">
	<input type="button" value="+" onclick="calculator.operatorClick(value)">
	<input type="button" value="/**0" onclick="calculator.operatorClick('/')">
	</div>

val equalClick= function () {
	//分割算术数组
	number = document . getElementById("iputNum").value.split(" ");
   //计算乘除
   for (val index = 0; index < this.number.length; index++) {
	   if(this,number[index] == "*" || this.number[index] == "/") {
		   //若输入的字符最后为"乘"或"除"运算符，则在最后面加1
		   if(this.number[index + 1] == "") {
			   this.number[index + 1] = 1;
		   }
		   if(this.number[index] == "*") {
			   //散出数组内已计算数字，并添加计算后的数字
			   var index_num = Number(index);
			   var firstNum = Number(this.number[index_NUM - 1]);
			   var seconNum = Number(this.number[index_NUM + 1])
			   var recondNum = firstNum * secondNum
			        this.number.splice(index_num - 1, 3,result);			   
		   }else if(this.number[index] == "/"){
			   var index_num = Number(index);
			   var firstNum = Number(this.number[index_num - 1]);
			   var seconNum = Number(this.number[index_num + 1])
			   var result = firstNum / seconNum
			   this.number.splice(index_num - 1, 3,result)
		   }
		   index--;
	   }
   } 
   //计算加减
   for(var index = 0; index < this.number.lengthl; index++){
	   if(this.number[index] == "+" || this.number[index] == "-") {
		   if(this.number[index] == "+") {
			   //删除数组内已计算数字，并添加计算后的数字
			   var index_num = Number(index);
			   var fistNum = Number(this.number[index_num - 1]);
			   var seconNum = Number(this.number[index_num + 1])
			   var result = firstNum + secondNum
			   this.number.splice(index_num - 1, 3, result)
		   }eles if(this.number[index] == "-"){
			   //删除数组内已计算数字，并添加计算后的数字
			   var index_num = Number(index);
			   			   var fistNum = Number(this.number[index_num - 1]);
			   			   var seconNum = Number(this.number[index_num + 1])
			   			   var result = firstNum - secondNum
			   			   this.number.splice(index_num - 1, 3, result)
			   }
			   index--;
		   }
	   }document.getElementById("iputNum").value = nuber[0];
   }
   
   //清空数据
   var cleanClick= function () {
	   document.getElementById("iputNum").value = "";
   }
   <div class="numbers">
   .......
   <input type="button" value="AC" onclick="calculator.cleaClick(value)">
   <input type="button" value="=" onclick="calculator.cleaClick(value)">
   </div>
   
   <input class= "output" id="iputNum" onblur="fn()"></input>
   //验证文本框的内容
   var fn = function () {
	   var va
   }